package com.young.coderule.common.redis;

import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
import org.springframework.data.redis.serializer.RedisSerializer;
import org.springframework.data.redis.serializer.StringRedisSerializer;

/**
 * @DESCRIPTION: 序列化工具
 * @USER: Young
 * @DATE: 2022/7/31 11:35
 */
public class RedisSerializerUtil {
    public static final RedisSerializer<String> redisSerializerString = StringRedisSerializer.UTF_8;
    public static final RedisSerializer<Long> redisSerializerLong = new Jackson2JsonRedisSerializer<Long>(Long.class);
    public static final FastJson2JsonRedisSerializer fastJson2JsonRedisSerializer = new FastJson2JsonRedisSerializer<>(Object.class);
}
